﻿@model borkoSi.Models.Gallery

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "borkoSi - " + @Model.Name;
}

@section bodytitle{
    <h2>@Model.Name</h2>
}

<div id="galeryFlickr" style="width: 720px; height: 480px; background: #000; margin: auto;">
</div>

@section Scripts {

    <!-- jQuery -->
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <!-- Galleria -->
    <script src="../../Addons/galleria/galleria-1.2.9.min.js" type="text/javascript"></script>
    <script src="../../Addons/galleria/plugins/flickr/galleria.flickr.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">

        // galery
        Galleria.loadTheme('../../Addons/galleria/themes/classic/galleria.classic.min.js');
        Galleria.configure({
            autoplay: 5000,
            imageCrop: false,
            transition: "flash",
            transitionSpeed: 1000,
            showCounter: false,
            showInfo: false,
        });

        // Disable right click & drag copy in Galleria
        $('#galeryFlickr').bind('contextmenu', function(e){
            return false;
        });

        $('#galeryFlickr').bind('dragstart', function(e){
            return false;
        });

        Galleria.run('#galeryFlickr', {
            flickr: 'set: @Model.GalleryNumber',
            flickrOptions: {
                sort: 'date-posted-desc',
                thumbSize: 'small',
                description: 'true'
            }
        });
    
    </script>

}